<template>
    <view class="topbar" :class="{'hidden':show}">
        <view class="empt"></view>
        <view class="fixed">
            <view class="w4">
                <navigator url="/pages/tools/index">
                    <image src="https://image.qmxip.com/web/sjbd/list/t-a.png"  mode="scaleToFill" lazy-load="true"></image>
                    <view>商标工具</view>
                </navigator>
            </view>
            <view class="w2">
                <button open-type='contact' bindcontact="contactCB" class="zixunbox">
                    <text>在线留言</text>
                </button>
                <navigator url="/pages/service/index" class="nav-a" open-type="switchTab">
                    <text>立即咨询</text>
                </navigator>
            </view>
        </view>
    </view>

</template>

<script>
import { $getImg } from '../utils'

export default {
    props:['show'],
    components: {},
    data () {
        return {
         
        }
    },

    onShow () {

    },
    onLoad () {
       
    },
    methods: {
        initData () {


        },
        contactCB(e) {
            // console.log(e.detail); // 输出：{errMsg: 'enterContact:ok'}
            // 进入客服会话页面成功，可进行自己的业务逻辑
            if (e.detail.errMsg === 'enterContact:ok') {
                swan.reportAnalytics('userMessage', {
                    visit: 1,
                    message: '进入客服页面PV'
                });
            }
            // 可进行一些进入失败的业务逻辑
            else {
                swan.reportAnalytics('userMessage', {
                    visit: 0,
                    message: '进入客服页面失败损失PV'
                });
            }
		}
    }
}
</script>

<style scoped lang="scss">
.topbar,.empt{
	height: 90rpx;
}
.topbar.hidden{
	display: none;
}
.fixed{
	position: fixed;
	bottom: 0;
	left: 0;
	height: 90rpx;
	width: 100%;
	background-color: #ffff;
	text-align: center;
	box-shadow: 0 -2px 5px rgba(0,0,0,.1);
	color: #333;
	z-index: 10;
}
.fixed image{
	width: 42rpx;
	height: 42rpx;
	margin-bottom: 4rpx;
}
/* .fixed image.small{
	width: 42rpx;
	height: 40rpx;
	margin: 4rpx 0 4rpx;
} */
.fixed .w4{
	float: left;
	box-sizing: border-box;
	width: 20%;
	height: 100%;
	font-size: 24rpx;
	padding-top: 8rpx;
	line-height: 1.2em;
}
.fixed .rline{
	border-right: 1px solid #eee;
}
.fixed .w2{
	float: left;
	width: 80%;
	height: 100%;
	background-color: #ffffff;
	color: #fff;
	font-size: 34rpx;
	line-height: 90rpx;
}
.zixunbox{
	float: left;
	width: 40%;
	padding: 0;
	margin: 0;
	font-size: 32rpx;
	font-weight: 500;
	background-color: #418ef1;
	color: #ffffff;
	border-radius: 0;
	height: 100%;
	line-height: 90rpx;
}
.fixed .min{
	font-size: 24rpx;
}
.nav-a{
	float: left;
	width: 60%;
	height: 100%;
	font-size: 32rpx;
	font-weight: 500;
	background-color: #ff5c00;
	color: #ffffff;
}
</style>
